package com.guilin.mapper;

import java.util.List;
import java.util.Map;

import com.guilin.domain.CareerDestination;
import org.apache.ibatis.annotations.Select;

/**
 * 毕业去向Mapper接口
 *
 * @author xiaoqi
 * @date 2025-06-23
 */
public interface CareerDestinationMapper
{
    /**
     * 查询毕业去向
     *
     * @param id 毕业去向主键
     * @return 毕业去向
     */
    public CareerDestination selectCareerDestinationById(Long id);

    /**
     * 查询毕业去向列表
     *
     * @param careerDestination 毕业去向
     * @return 毕业去向集合
     */
    public List<CareerDestination> selectCareerDestinationList(CareerDestination careerDestination);

    /**
     * 新增毕业去向
     *
     * @param careerDestination 毕业去向
     * @return 结果
     */
    public int insertCareerDestination(CareerDestination careerDestination);

    /**
     * 修改毕业去向
     *
     * @param careerDestination 毕业去向
     * @return 结果
     */
    public int updateCareerDestination(CareerDestination careerDestination);

    /**
     * 删除毕业去向
     *
     * @param id 毕业去向主键
     * @return 结果
     */
    public int deleteCareerDestinationById(Long id);

    /**
     * 批量删除毕业去向
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCareerDestinationByIds(Long[] ids);

    /**
     * 根据职业类别统计数量
     * @return
     */
    List<Map<String, Object>> countByCategory();

    /**
     * 根据校友ID查询毕业去向信息
     * @param alumniId
     * @return
     */
    @Select("select id, alumni_id, destination_type, sub_type, organization, location, position_title, major_name, degree, department, entry_time, create_time, update_time from career_destination where alumni_id = #{alumniId}")
    CareerDestination selectByAlumniId(Long alumniId);
}
